
package com.scs.application.modules.base.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.scs.application.core.service.IBaseService;
import com.scs.application.modules.base.entity.Supplier;
import com.scs.application.modules.base.request.SupplierQueryRequest;

import java.util.List;


/**
 * 供应商 service 接口
 *
 */
public interface SupplierService extends IBaseService<Supplier> {

    /**
     * 根据机构ID获取供应商信息
     *
     * @param officeId
     * @return
     */
    Supplier findByOfficeId(String officeId);

    /**
     * 添加供应商
     *
     * @param entity
     */
    void addSupplier(Supplier entity);

    void changeLoginKey(String id, String newLoginKey);

    IPage<Supplier> page(SupplierQueryRequest request);


    List<Supplier> list(SupplierQueryRequest request);

    /**
     * 获取供应商，关键字搜索
     *
     * @param request
     * @param keywords
     * @return
     */
    IPage<Supplier> pageByKeywords(SupplierQueryRequest request, String keywords);

    /**
     * 查询当前医院下不存在供应商
     */
    IPage<Supplier> pageHospitalNotExisted(SupplierQueryRequest request);


}
